import request from '@/utils/request'

// 查询日常巡查项列表
export function listDailyInspectionItems(query) {
  return request({
    url: '/patrol/dailyInspectionItems/list',
    method: 'get',
    params: query
  })
}

// 查询日常巡查项详细
export function getDailyInspectionItems(id) {
  return request({
    url: '/patrol/dailyInspectionItems/' + id,
    method: 'get'
  })
}

// 新增日常巡查项
export function addDailyInspectionItems(data) {
  return request({
    url: '/patrol/dailyInspectionItems',
    method: 'post',
    data: data
  })
}

// 修改日常巡查项
export function updateDailyInspectionItems(data) {
  return request({
    url: '/patrol/dailyInspectionItems',
    method: 'put',
    data: data
  })
}

// 删除日常巡查项
export function delDailyInspectionItems(id) {
  return request({
    url: '/patrol/dailyInspectionItems/' + id,
    method: 'delete'
  })
}

// 获取当前记录表的日常巡查记录
export function getDailyInspectionItem(dailyInspectionId) {
  return request({
    url: '/patrol/dailyInspectionItems/item/' + dailyInspectionId,
    method: 'get'
  })
}

// 添加日常巡查情况记录
export function addDailyInspectionEval(data) {
  return request({
    url: '/patrol/dailyInspectionItems/addDailyInspectionEval',
    method: 'post',
    data: data
  })
}

// 修改（更新）日常巡查情况记录
export function updateDailyInspectionEval(data) {
  return request({
    url: '/patrol/dailyInspectionItems/updateDailyInspectionEval',
    method: 'post',
    data: data
  })
}